package com.aw.baselib.util;

public class AwStrUtil {

    public static String extractContentBetweenStrings(String originalString, String start, String end) {
        String[] parts = originalString.split(start);
        if (parts.length > 1) {
            parts = parts[1].split(end);
            if (parts.length > 0) {
                return parts[0];
            }
        }
        return ""; // 如果找不到匹配的内容，返回空字符串
    }

    public static String extractAll(String originalStr, String startStr, String endStr) {
        return originalStr.replaceAll(startStr + ".*?" + endStr, "");
    }

    public static String extractAll(String originalStr) {
        return originalStr.replaceAll("\\{.*?\\}", "");
    }
}
